import React, { Component } from "react";
import { withRouter } from "react-router-dom";
import { Button } from "antd";
class Header extends Component {
  goBack = () => {
    this.props.history.goBack();
  };
  render() {
    console.log(this.props);
    return (
      <div className="row">
        <div className="col-xs-offset-2 col-xs-8">
          <div className="page-header">
            <h2>React Router Demo</h2>
            <Button type="primary" onClick={this.goBack}>
              goBack
            </Button>
            <Button type="primary" onClick={this.goForward}>
              goFroward
            </Button>
            <Button type="primary" onClick={this.go}>
              go
            </Button>
          </div>
        </div>
      </div>
    );
  }
}
export default withRouter(Header);
